//
//  DMMineTwoViewCell.m
//  DMGME
//
//  Created by MC on 15/10/17.
//  Copyright © 2015年 GYP. All rights reserved.
//

#import "DMMineTwoViewCell.h"
#import "DMMineModel.h"

@implementation DMMineTwoViewCell

- (void)awakeFromNib {
    // Initialization code
}
-(void)setDmModel:(DMMineModel *)dmModel
{
    _dmModel = dmModel;
    
    _order_id.text = [NSString stringWithFormat:@"订 单 号:  %@",dmModel.order_sn];
    if (dmModel.type.intValue == 1) {
        _orderID.text = [NSString stringWithFormat:@"补贴类型: 订单补贴"];
    }
    
   
    _subsidiesMoney.text = [NSString stringWithFormat:@"补贴金额:￥%@",dmModel.subsidy];
    //时间戳转化为时间字符串
    NSDate *date = [[NSDate alloc] initWithTimeIntervalSince1970:[dmModel.finish_time longLongValue]];
    NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    NSString *str = [formatter stringFromDate:date];
    //    NSLog(@"date1:%@",str);
    _orderFinishTime.text = [NSString stringWithFormat:@"订单完成时间: %@",str];
    
    UIImageView *line = [[UIImageView alloc] initWithFrame:CGRectMake(0, self.contentView.frame.size.height-1, KWidth, 1)];
    line.backgroundColor = [UIColor lightGrayColor];
    line.alpha = 0.4;
    [self.contentView addSubview:line];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
